package com.prizedraw.prize_draw.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author czj666
 * @since 2021-09-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysUser extends BaseEntity {

    private static final long serialVersionUID = 1L;


    private String userId;

    @NotBlank(message = "用户名不能为空")
    private String userName;


    private String passowrd;

    private Integer gender;

    private String phoneNum;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date hiredate;

    @TableField(exist = false)
    private List<DepartmentRole> departmentRoles = new ArrayList<>();

    @TableField(exist = false)
    private List<Integer> menuIds = new ArrayList<>();

}
